<?php
/**
 * sfGuardUser actions.
 *
 * @package    ##PROJECT_NAME##
 * @subpackage sfGuardUser
 * @author     ##AUTHOR_NAME##
 * @version    SVN: $Id: actions.class.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith
 */
class sfGuardUserActions extends autoSfGuardUserActions
{

  public function executeEdit(sfWebRequest $request)
  {
    //$this->sf_guard_user = $this->getRoute()->getObject();
	$this->forward404Unless($this->sf_guard_user = Doctrine::getTable('sfGuardUser')->find(array($request->getParameter('id'))), sprintf('Object sf_guard_user does not exist (%s).', $request->getParameter('id')));
    $this->form = $this->configuration->getForm($this->sf_guard_user);
  }
  public function executeCreate(sfWebRequest $request)
  {
    $this->form = $this->configuration->getForm();
    $this->sf_guard_user = $this->form->getObject();
    $param = $request->getParameter($this->form->getName());
    $param['is_active'] = 1;
    $param['is_super_admin'] = 0;
    //$param['groups_list'] = 3;
    //$param['permissions_list'] = 3;
    $request->setParameter($this->form->getName(),$param);	
    $this->processForm($request, $this->form);
    $this->setTemplate('new');
  }

  
}